<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    
<button>点我</button>
<!-- 背景图修改 点击按钮后切换图片 -->
<script>
    let button = document.querySelector('button')
    // 点击事件
    button.onclick = function(){
        console.log(123)
    }
</script>
</body>
</html>